package com.ruoyi.business.mapper;

import com.ruoyi.business.domain.Category;

import java.util.List;

/**
 * CategoryMapper接口
 * 
 * @author win
 * @date 2021-06-14
 */
public interface CategoryMapper 
{
    /**
     * 查询Category
     * 
     * @param id CategoryID
     * @return Category
     */
    public Category selectCategoryById(Long id);

    /**
     * 查询Category列表
     * 
     * @param category Category
     * @return Category集合
     */
    public List<Category> selectCategoryList(Category category);

    /**
     * 新增Category
     * 
     * @param category Category
     * @return 结果
     */
    public int insertCategory(Category category);

    /**
     * 修改Category
     * 
     * @param category Category
     * @return 结果
     */
    public int updateCategory(Category category);

    /**
     * 删除Category
     * 
     * @param id CategoryID
     * @return 结果
     */
    public int deleteCategoryById(Long id);

    /**
     * 批量删除Category
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteCategoryByIds(Long[] ids);

    /**
     * 根据位置编码统计栏目数量
     * @param position
     * @return
     */
    public Integer countCategories(Integer position);
}
